From f76bd5cf5e9e56b46c8c5acb595dbec6b842c34d Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Thu, 27 Oct 2005 10:53:02 +0100 Subject: [PATCH] Fix Jerone Young's xenstat / xenstore patch: Reject the removal of -Werror from the xentop Makefile. Reject the #include of xs.h inside xentop -- there is no need for it. Have XendDomainInfo write domain names into /local/domain (which used to happen, but hasn't for a little while). Remove the dead code from xentop.c. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 1 + tools/xenstat/xentop/Makefile | 2 +- tools/xenstat/xentop/xentop.c | 16 ---------------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 11256f8916..999716219d 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -595,6 +595,7 @@ class XendDomainInfo: to_store = { 'domid': str(self.domid), 'vm': self.vmpath, + 'name': self.info['name'], 'console/limit': str(xroot.get_console_limit() * 1024), 'memory/target': str(self.info['memory_KiB']) } diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile index 2115e6f3cf..633fd57064 100644 --- a/tools/xenstat/xentop/Makefile +++ b/tools/xenstat/xentop/Makefile @@ -26,7 +26,7 @@ mandir=$(prefix)/share/man man1dir=$(mandir)/man1 sbindir=$(prefix)/sbin -CFLAGS += -DGCC_PRINTF -Wall -I$(XEN_LIBXENSTAT) +CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT) LDFLAGS += -L$(XEN_LIBXENSTAT) LDLIBS += -lxenstat -lncurses diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c index 286b037051..050f95bfcb 100644 --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -28,7 +28,6 @@ #include #include -#include #include #define XENTOP_VERSION "1.0" @@ -68,8 +67,6 @@ static int compare_domains(xenstat_domain **, xenstat_domain **); static unsigned long long tot_net_bytes( xenstat_domain *, int); /* Field functions */ -static int compare_domid(xenstat_domain *domain1, xenstat_domain *domain2); -static void print_domid(xenstat_domain *domain); static int compare_state(xenstat_domain *domain1, xenstat_domain *domain2); static void print_state(xenstat_domain *domain); static int compare_cpu(xenstat_domain *domain1, xenstat_domain *domain2); @@ -131,7 +128,6 @@ typedef struct field { } field; field fields[] = { -// { FIELD_DOMID, "DOMID", 5, compare_domid, print_domid }, { FIELD_NAME, "NAME", 10, compare_name, print_name }, { FIELD_STATE, "STATE", 6, compare_state, print_state }, { FIELD_CPU, "CPU(sec)", 10, compare_cpu, print_cpu }, @@ -349,18 +345,6 @@ static int compare_domains(xenstat_domain **domain1, xenstat_domain **domain2) /* Field functions */ -/* Compares domain ids of two domains, returning -1,0,1 for <,=,> */ -int compare_domid(xenstat_domain *domain1, xenstat_domain *domain2) -{ - return compare(xenstat_domain_id(domain1), xenstat_domain_id(domain2)); -} - -/* Prints domain identification number */ -void print_domid(xenstat_domain *domain) -{ - print("%5u", xenstat_domain_id(domain)); -} - /* Compare domain names, returning -1,0,1 for <,=,> */ int compare_name(xenstat_domain *domain1, xenstat_domain *domain2) { -- 2.30.2